doctype html
html
  head
    meta(charset='UTF-8')
    include ./includes/styles.pug
    include ./includes/scripts.pug
    title XSCMS
  body
    #app
      include ./includes/header.pug
      .container
        //- include ./includes/content.pug
        //- a(href='/post/2') 新的文章
        //- a(href='/post/3') 再来一篇文章
        .content
          .left-wrapper
            each item in posts
              el-card.box-card
                .clearfix(slot='header')
                  span #{item.name}
                  if item.type==1
                    a(href= '/category/'+ item.code style='float: right;') 查看更多
                  else if item.type==2
                    a(href= '/channel/'+ item.code style='float: right;') 查看更多
                  else if item.type==4
                    a(href= '/pages/'+ item.code style='float: right;') 查看更多
                  else
                    a(href= '/link/'+ item.code style='float: right;') 查看更多
                //- 更多文章部分
                //- 1:栏目， 2:频道，3:链接 4:单页
                each post in item.posts
                  .text.postitem.ellipsis
                    a(href='/post/'+post.id+'.html' target='_blank') #{post.name}
                //- 频道部分
                if item.children && item.children.length>0
                each children in item.children
                  .text.postitem
                    a(href= '/category/'+children.code) #{children.name}
          .right-wrapper
            el-card.box-card
              .clearfix(slot='header')
                span 阅读总榜
              each item in totalRank
                .text.postitem.ellipsis
                  a(href='/post/'+item.id+'.html' target='_blank') #{item.name}
            el-card.box-card
              .clearfix(slot='header')
                span 阅读本月榜
              .text.item
                | 列表内容
            el-card.box-card
              .clearfix(slot='header')
                span 阅读本周榜
              .text.item
                | 列表内容
            el-card.box-card
              .clearfix(slot='header')
                span 阅读本日榜
              .text.item
                | 列表内容
  script.
    window.vue = new Vue({
      el: '#app',
      data: function() {
        return { activeIndex: '1' }
      },
      methods: {
        handleSelect(key, keyPath) {
          console.log(key, keyPath);
        }
      }
    })
